/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package bai7;

import java.util.Scanner;

/**
 *
 * @author PhamPhuong
 */
public class GiangVienCoHuu extends GiangVien{
    
    public int _sohTrongThang;
    public double _LuongThoaThuan;
    public int _sohQuyDinh;
    
    public void Nhap(){
        Scanner scan = new Scanner(System.in);
        System.out.print("Nhap Ten Giang Vien:");
        _Ten = scan.nextLine();
        System.out.print("Nhap Dia Chi:");
        _DiaChi = scan.nextLine();
        System.out.print("Nhap Ten DienThoai:");
        _DienThoai = scan.nextLine();
        System.out.print("Nhap Email:");
        _Email = scan.nextLine();
        System.out.print("Nhap So h Lam Viec:");
        _sohTrongThang = scan.nextInt();
        System.out.print("Nhap Luong Thoa Thuan:");
        _LuongThoaThuan = scan.nextDouble();
        System.out.print("Nhap So h Quy Dinh:");
        _sohQuyDinh = scan.nextInt();
        System.out.print("----------------------");
    }
    public void Xuat(){
        System.out.println("Giang Vien:" + _Ten);
        System.out.println("Dia Chi:" + _DiaChi);
        System.out.println("Dien Thoai:" + _DienThoai);
        System.out.println("Email:" + _Email);
        System.out.println("So h Lam Viec:" + _sohTrongThang);
        System.out.println("Luong Thoa Thuan:" + _LuongThoaThuan);
        System.out.println("So h Quy Dinh:" + _sohQuyDinh);
        System.out.print("----------------------");
    }
    public double TinhLuong(){
        double Luong = 0;
        if( (_sohTrongThang - _sohQuyDinh) >0)
            Luong = (_LuongThoaThuan/(26*8)) + (_LuongThoaThuan/(26*8))*(_sohTrongThang - _sohQuyDinh);
        else
            Luong = (_LuongThoaThuan/(26*8)) - (_LuongThoaThuan/(26*8))*(_sohTrongThang - _sohQuyDinh);
        return Luong;
    }
    
}
